<?php

	function spiel_loeschen($matchId)
	{
		$q = "DELETE FROM $tbl_events WHERE matchId=$match";
		$qe = mysql_query($q);
		$q = "DELETE FROM $tbl_matches WHERE id=$match";
		$qe = mysql_query($q);
		
		return $matchId;
	}
	
	function gruppe_team_loeschen($gruppe,$team)
	{
		$q = "DELETE FROM $tbl_gt WHERE teamId=$team";
		$qe = mysql_query($q);
		$q = "SELECT id FROM $matches WHERE ((homeT=$team) OR (guestT=$team)) AND stageId=$gruppe";
		$qe = mysql_query($q);
		
		while ($row=mysql_fetch_object($qe))
		{
			$id=$row->id;
			$l=spiel_loeschen($id);
		}
		
		return $matchId;
	}
	
	function gruppe_loeschen($gruppe)
	{
		
	}

?>